home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / offlnsft.lha / OfflineSafety / Magic.dat < prev   
Text File  |  1995-07-27  |  1KB  |  35 lines

  1. /* You would place this somewhere in your grab command etc. */
  2.  
  3.     rexx("SaveUser");
  4.     dos("BBS:Util/DoHighReadMagic \(GetUserPath(GetUserName())) SAVE");
  5.  
  6. /* It is important to save the user file first, because DoHighReadMagic
  7.    accesses the User.dat file in the user's directory. This must of course
  8.    be executed before running TechQWK or TechWWF... */
  9.  
  10.  
  11.  
  12. /* This is a full command that restores the message pointers. */
  13.  
  14. Command "restore" (G: N:3) {
  15.     $user = GetUserName();
  16.     $time = GetTimeLeft();
  17.     rexx("SaveUser");
  18.     dos("BBS:Util/DoHighReadMagic \(GetUserPath(GetUserName())) LOAD");
  19.     rexx("LoadUser \($user)");
  20.     rexx("SetTimeLeft \($time)");
  21.     rexx("SendModem \(27)[33mMessage pointers restored.\(27)[0m\(13)\(10)");
  22.     rexx("LogEntry Restoring message pointers");
  23. };
  24.  
  25. /* Here we save the user first so that we don't lose any changes etc.
  26.    Then we do magic on the file, and load the user back. TechnoBBS
  27.    seems to mess up the user's time left, so we need to patch it. */
  28.  
  29. /* Note! DoHighReadMagic produces some output to stdout, but I am not
  30.    redirecting it to TECHIO: here, because I don't think the user wants
  31.    to see the technical details... However, you might want to do this
  32.    in the restore command. The user will then see the error message if
  33.    an error would occur. */
  34.  
  35.